/*
 * @Description: 
 * @Author: Zhang_xx
 * @Date: 2025-03-26 17:38:25
 * @LastEditors: Zhang_xx
 * @LastEditTime: 2025-03-28 10:53:46
 */
const Mock = require('mockjs')
const Random = Mock.Random
const getQuestionList = require('../data/getQuestionList')
module.exports = [
  {
    url: '/api/question/:id',
    method: 'get',
    response() {
      return {
        errno: 0,
        data: {
          id: Random.id(),
          title: Random.ctitle(),
        },
      }
    },
  },
  // 创建问卷
  {
    url: '/api/question',
    method: 'post',
    response() {
      return {
        errno: 0,
        dtata: {
          id: Random.id(),
        },
      }
    },
  },
  // 获取问卷列表
  {
    url: '/api/question',
    method: 'get',
    response() {
      return {
        errno: 0,
        data: {
          list: getQuestionList(),
          total: 100,
        },
      }
    },
  },
]